package thread02;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;

/**
 * 仓库类
 * @author if
 *
 */
public class Storage {

	private BlockingQueue<Product> queues = new LinkedBlockingDeque<Product>(10);
	
	public void push(Product p) throws InterruptedException {
		queues.put(p);
	}
	
	public Product pop() throws InterruptedException {
		return queues.take();
	}
}
